package com.dh.edu.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * 服务实现
 *
 * @Date Created in 2022/8/16 14:10
 */
@RestController
public class IndexController {
    @Value("${server.port}")
    private int port;

    @GetMapping("/index")
    public Map<String, Object> index() {
        Map<String, Object> res = new HashMap<>();
        res.put("port", port);
        return res;
    }
}
